package frsf.cidisi.exercise.arq.search;

import interfaz.Principal;
import frsf.cidisi.faia.exceptions.PrologConnectorException;
import frsf.cidisi.faia.simulator.SearchBasedAgentSimulator;
import frsf.cidisi.faia.simulator.events.EventType;
import frsf.cidisi.faia.simulator.events.SimulatorEventNotifier;

public class AgenteArqueologoMain {

    public static void main(String[] args) throws PrologConnectorException {
        AgenteArqueologo agent = new AgenteArqueologo();

        IslaEmiroce environment = new IslaEmiroce();

        SearchBasedAgentSimulator simulator =
                new SearchBasedAgentSimulator(environment, agent);
        
        Principal principal = new Principal();
        
        SimulatorEventNotifier.SubscribeEventHandler(EventType.IterationFinished, principal);
        SimulatorEventNotifier.SubscribeEventHandler(EventType.SimulationFinished, principal);
        
        simulator.start();
    }

}
